using System;
using System.Linq;
using System.Collections.Generic;
using System.Security.Principal;
using JSC.Portal.Entities.Interfaces;

namespace JSC.Portal.Entities
{
    public partial class Section : DescriptiveEntity, ITracked, IValid
	{
        public Section()
            : base()
        {
            SectionPermissions = new List<SectionPermission>();
		    Settings = new List<SectionModulePropertyValue>();

            Position = -1;
            ValidFrom = DateTime.Now.Date;
        }

		public ModuleType ModuleType
		{
            get;
            set;
		}

		public string Placeholder
		{
            get;
            set;
		}

		public int Position
		{
            get;
            set;
		}

		public PortalPage Page
		{
            get;
            set;
		}

        public bool ShowName
        {
            get;
            set;
        }

        #region ITrackedEntity Members

        public PortalUser CreatedByUser
        {
            get;
            set;
        }

        public PortalUser ModifiedByUser
        {
            get;
            set;
        }

        public DateTime CreatedOn
        {
            get;
            set;
        }

        public DateTime? ModifiedOn
        {
            get;
            set;
        }

        #endregion

        #region IValid Members

        public DateTime ValidFrom
        {
            get;
            set;
        }

        public DateTime? ValidTill
        {
            get;
            set;
        }

        #endregion

        public IList<SectionPermission> SectionPermissions
        {
            get;
            set;
        }

        public IList<SectionModulePropertyValue> Settings
        {
            get;
            set;
        }
	}
}
